package com.zut.fitness.controller;


import com.zut.fitness.common.Result;
import com.zut.fitness.pojo.FitnessMembershipCard;
import com.zut.fitness.service.IFitnessMembershipCardService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;


import java.util.List;

/**
 * 会员卡Controller
 * 
 * @author admin
 * @date 2025-01-03
 */
@RestController
@RequestMapping("/MembershipCard")
public class FitnessMembershipCardController
{
    @Autowired
    private IFitnessMembershipCardService fitnessMembershipCardService;

    /**
     * 查询会员卡列表
     */

    @GetMapping
    public Result<List<FitnessMembershipCard>> list()
    {

        List<FitnessMembershipCard> list = fitnessMembershipCardService.selectFitnessMembershipCardList();
        return Result.success(list);
    }


    @GetMapping(value = "/{id}")
    public Result<FitnessMembershipCard> getInfo(@PathVariable("id") Long id)
    {
        return Result.success(fitnessMembershipCardService.selectFitnessMembershipCardById(id));
    }


}
